Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(NODE-1477): Configuration revamp (IC-OS integration) #1563

Draft
wants to merge 37 commits into
base: master
Choose a base branch
from

Conversation

andrewbattat
Copy link
Member

@andrewbattat andrewbattat commented Sep 18, 2024

The IC-OS tool has been created, but not yet used by the IC-OS: #1539

This PR integrates the config tool into the IC-OS. The config tool is utilized for config sanitization, organization, access, and propagation.

Once we are happy with the new design, we will worry about the rollout and preserving backwards compatibility.

@github-actions github-actions bot added the feat label Sep 18, 2024
@andrewbattat andrewbattat changed the title feat(NODE-1360): Configuration revamp (IC-OS integration) feat(NODE-1477): Configuration revamp (IC-OS integration) Sep 18, 2024
Comment on lines 8 to 12
function get_config_value() {
local CONFIG_FILE="/var/ic/config/config.json"
local key=$1
jq -r "${key}" "${CONFIG_FILE}"
}
Copy link
Member Author

@andrewbattat andrewbattat Sep 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we get a non-existant key, should we throw an error? Or just log that the key has not been found and return null?

@andrewbattat andrewbattat self-assigned this Oct 3, 2024
Comment on lines +26 to +43
match &network_settings.ipv6_config {
Ipv6Config::RouterAdvertisement => {
Err(anyhow!("IC-OS router advertisement is not yet supported"))
}
Ipv6Config::Fixed(_) => Err(anyhow!("Fixed IP configuration is not yet supported")),
Ipv6Config::Deterministic(ipv6_config) => {
let ipv6_address = generate_ipv6_address(&ipv6_config.prefix, &generated_mac)?;
eprintln!("Using ipv6 address: {}", ipv6_address);

let formatted_mac = FormattedMacAddress::from(&generated_mac);
generate_systemd_config_files(
output_directory,
ipv6_config,
Some(&formatted_mac),
&ipv6_address,
)
}
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note the change now that Ipv6Config is stored as an enum

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant